package com.yaowk.common.api;


import java.io.Serializable;
import java.util.List;

public interface IBaseService<M extends BaseModel, ID extends Serializable> {

    M add(M model);

    M save(M model);

    M update(M model);

    void deleteById(ID id);

    void delete(M model);

    M findById(ID id);

    M findOne(M model);

    List<M> findAll();

    List<M> findAll(M model);

    PageResp<M> findAll(PageReq pageReq);

    PageResp<M> findAll(M model, PageReq pageReq);
}

